﻿using PortalCurriculo.Domain.Interface;
using System.Linq;

namespace PortalCurriculo.Domain
{
    public partial class Profissional : IProfissional
    {
        public Profissional Selecionar()
        {
            return (from profissional in Context.Instance.Profissionals
                    where (profissional.Id.Equals(Id) || Id.Equals(0))
                          && (profissional.IdUsuario.Equals(IdUsuario) || IdUsuario.Equals(0))
                          && profissional.Ativo
                    select profissional).FirstOrDefault();
        }
    }
}
